<table class="table table-striped table-bordered">
  <thead>
    <tr>
      <td class="text-left">{{ column_transaction }}</td>
      <td class="text-left">{{ column_amount }}</td>
      <td class="text-left">{{ column_type }}</td>
      <td class="text-left">{{ column_status }}</td>
      <td class="text-left">{{ column_pending_reason }}</td>
      <td class="text-left">{{ column_date_added }}</td>
      <td class="text-left">{{ column_action }}</td>
    </tr>
  </thead>
  <tbody>

    {% if transactions %}
      {% for transaction in transactions %}
        <tr>
          <td class="text-left">{{ transaction.transaction_id }}</td>
          <td class="text-left">{{ transaction.amount }}</td>
          <td class="text-left">{{ transaction.payment_type }}</td>
          <td class="text-left">{{ transaction.payment_status }}</td>
          <td class="text-left">{{ transaction.pending_reason }}</td>
          <td class="text-left">{{ transaction.date_added }}</td>
          <td class="text-left"> {% if transaction.transaction_id %} <a href="{{ transaction.view }}" data-toggle="tooltip" title="{{ button_view }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
              {% if transaction.payment_type == 'instant' and (transaction.payment_status == 'Completed' or transaction.payment_status == 'Partially-Refunded') %}
                <a href="{{ transaction.refund }}" data-toggle="tooltip" title="{{ button_refund }}" class="btn btn-danger"><i class="fas fa-reply"></i></a>&nbsp;
              {% else %}
                <button type="button" value="{{ transaction.resend }}" data-toggle="tooltip" title="{{ button_resend }}" class="btn btn-info"><i class="fas fa-sync"></i></button>
              {% endif %}
            {% endif %} </td>
        </tr>
      {% endfor %}
    {% else %}
      <tr>
        <td class="text-center" colspan="7">{{ text_no_results }}</td>
      </tr>
    {% endif %}
  </tbody>

</table>
